package com.bianmaba.spring.supports.data.repository.specification.condition.predicate.generator;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Expression;
import java.lang.reflect.Method;

/**
 * Created by cwx183898 on 2017/12/17.
 */
public class NotLikePredicateGenerator extends LikePredicateGenerator {


    public NotLikePredicateGenerator(String before, String after) {
        super(before, after);
    }

    protected Method getCreateMethod(CriteriaBuilder builder) {
        try {
            Method method = builder.getClass().getMethod("not", Expression.class);
            return method;
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }
        return null;
    }
}